package com.kai.service.Impl;

import com.kai.dao.CityMapper;
import com.kai.dao.CountyMapper;
import com.kai.dao.ProvinceMapper;
import com.kai.pojo.City;
import com.kai.pojo.County;
import com.kai.pojo.Province;
import com.kai.service.AddressService;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AddressServiceImpl implements AddressService {
    @Autowired
    private ProvinceMapper provinceMapper;
    @Autowired
    private CityMapper cityMapper;
    @Autowired
    private CountyMapper countyMapper;
    @Override
    public List<Province> selectAllProvince() {
        return provinceMapper.selectAllProvince();
    }

    @Override
    public List<City> selectCityByValue(String pvalue) {
        return cityMapper.selectCityByValue(pvalue);
    }

    @Override
    public List<County> selectCountyByValue(String cvalue) {
        return countyMapper.selectCountyByValue(cvalue);
    }

    @Override
    public String selectProvince(String province) {
        return provinceMapper.selectProvince(province);
    }

    @Override
    public String selectCity(String city) {
        return cityMapper.selectCity(city);
    }

    @Override
    public String selectCounty(String county) {
        return countyMapper.selectCounty(county);
    }

}
